﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace Dracham.Classes
{
    public class Teleport : Action
    {
        public Position Destination { get; set; }

        public Teleport() : base()
        {
            this.Destination = new Position();
        }

        public static Teleport FromXmlNode(XmlNode node)
        {
            Teleport t = new Teleport();

            t.Destination.X = float.Parse(node.Attributes["X"].Value);
            t.Destination.Y = float.Parse(node.Attributes["Y"].Value);
            t.Destination.ZoneId = node.Attributes["Zone"].Value;

            return t;
        }
    }
}
